<?php
/**
 * @package      OWNServices
 * @subpackage   Admin
 *
 * @author       Sanawin Tinsuwan	
 * @copyright    Copyright (C) 20014 Sanawin Tinsuwan. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */

defined('_JEXEC') or die();

jimport('joomla.application.component.view');


/**
 * Projectfork Project List View Class
 *
 */
class OWNServicesViewOWNServices extends JViewLegacy
{
    /**
     * Displays the view.
     *
     * @return    void
     */
    public function display($tpl = null)
    {
		$this->canDo		= JHelperContent::getActions('com_ownservices');

        if ($this->getLayout() !== 'modal') $this->addToolbar();

        parent::display($tpl);
    }

    /**
     * Add the page title and toolbar.
     *
     */
    protected function addToolbar()
    {
		$canDo	= $this->canDo;
		
        JToolBarHelper::title(JText::_('COM_OWNSERVICES_DASHBOARD_TITLE'), 'article.png');

       if ($canDo->get('core.admin')){
            JToolBarHelper::preferences('com_ownservices');
        }
    }
}